package com.spring_core_demos.lifecycle;

import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import com.spring_core_demos.lifecycle.testbean.LifeManager;

public class LifecycleBeanDemo implements BeanNameAware,InitializingBean,DisposableBean {
	private LifeManager lifeManager;
	public void setBeanName(String name) {
		System.out.println("setBeanName() name="+name);
	}
	
	public void afterPropertiesSet() throws Exception {
		System.out.println("afterPropertiesSet()"+" lifeManager="+lifeManager);
	}

	public void destroy() throws Exception {
		System.out.println("destroy()");
	}

	public void setLifeManager(LifeManager lifeManager) {
		this.lifeManager = lifeManager;
	}

}
